home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / WWW / Library / Implementation / HTStream.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  1.8 KB  |  62 lines

  1. /*                                                      The Stream class definition -- libwww
  2.                                  STREAM OBJECT DEFINITION
  3.                                              
  4.    A Stream object is something which accepts a stream of text.
  5.    
  6.    The creation methods will vary on the type of Stream Object.   All creation methods
  7.    return a pointer to the stream type below.
  8.    
  9.    As you can see, but the methods used to write to the stream and close it are pointed to
  10.    be the object itself.
  11.    
  12.  */
  13. #ifndef HTSTREAM_H
  14. #define HTSTREAM_H
  15.  
  16. #ifndef HTUTILS_H
  17. #include "HTUtils.h"
  18. #endif /* HTUTILS_H */
  19.  
  20. typedef struct _HTStream HTStream;
  21.  
  22. /*
  23.  
  24.    These are the common methods of all streams.  They should be self-explanatory, except
  25.    for end_document which must be called before free.  It should be merged with free in
  26.    fact:  it should be dummy for new streams.
  27.    
  28.    The put_block method was write, but this upset systems whiuch had macros for write().
  29.    
  30.  */
  31. typedef struct _HTStreamClass {
  32.  
  33.         char*  name;                            /* Just for diagnostics */
  34.                 
  35.         void (*_free) PARAMS((
  36.                 HTStream*       me));
  37.  
  38.         void (*_abort) PARAMS((
  39.                 HTStream*       me,
  40.                 HTError         e));
  41.                 
  42.         void (*put_character) PARAMS((
  43.                 HTStream*       me,
  44.                 char            ch));
  45.                                 
  46.         void (*put_string) PARAMS((
  47.                 HTStream*       me,
  48.                 CONST char *    str));
  49.                 
  50.         void (*put_block) PARAMS((
  51.                 HTStream*       me,
  52.                 CONST char *    str,
  53.                 int             len));
  54.  
  55. }HTStreamClass;
  56.  
  57. #endif /* HTSTREAM_H */
  58.  
  59. /*
  60.  
  61.    end of HTStream.h */
  62.